home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995…tember: Reference Library / Dev.CD Sep 95 RL / Dev.CD Sep 95 RL.toast / mac / Technical Documentation / develop / develop Issue 15 code / 3D Interface / 3D Buttons CDEF / Source / 3D Buttons CDEF source / (3D Buttons CDEF.π) / LGBPushButton.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-12-06  |  1.5 KB  |  90 lines  |  [TEXT/MMCC]

  1. /**************************************************************************
  2.     LGBPushButton
  3.     
  4.     Public domain, by Zig Zichterman.
  5.     
  6.     This class implements 3D push buttons according to the guidelines
  7.     suggested in _develop_ 15. Some of the drawing code is taken from
  8.     the public domain source accompanying _develop_ 15.
  9.     
  10.     11/25/94    zz    add CreateMask()
  11. **************************************************************************/
  12. #pragma once
  13.  
  14. class LGBPushButton {
  15.     public :
  16.         static long
  17.         Main(
  18.             short            inVariation,
  19.             ControlHandle    ioControl,
  20.             short            inMsg,
  21.             long            ioParam);
  22.  
  23.     protected :
  24.         ControlHandle    mControl;
  25.         Boolean            mUseWFont;
  26.         GrafPtr            mWindowPort;
  27.         RGBColor        mBackgroundColor;
  28.         RGBColor        mInactiveFrameColor;
  29.  
  30.     // ———— constructor —————————————————————————————————————————————
  31.         LGBPushButton(
  32.             ControlHandle    inControl,
  33.             Boolean            inUseWFont);
  34.             
  35.         
  36.     // ———— dispatch —————————————————————————————————————————————————
  37.     protected :
  38.         void
  39.         Draw(
  40.             long    inPartCode);
  41.             
  42.         Boolean
  43.         Test(
  44.             Point    inHitPt);
  45.             
  46.         void
  47.         CalcCRgn(
  48.             RgnHandle    ioRgn);
  49.         
  50.     // ———— Draw —————————————————————————————————————————————————————
  51.     protected :
  52.         void
  53.         DrawBW(void);
  54.         
  55.         void
  56.         DrawColor(void);
  57.         
  58.         void
  59.         DrawColorInactive(void);
  60.         
  61.         void
  62.         DrawColorActive(void);
  63.         
  64.         void
  65.         DrawName(
  66.             Boolean    inDim1Bit = false);
  67.         
  68.         void
  69.         DrawFrame(void);
  70.         
  71.         RgnHandle
  72.         CreateMask(void);
  73.         
  74.         void
  75.         EraseInsides(void);
  76.         
  77.         void
  78.         Draw3DEffects(void);
  79.  
  80.         void
  81.         CalcColors(void);
  82.         
  83.         void
  84.         UseBackgroundColor(void);
  85.                 
  86.         void
  87.         UseInactiveFrameColor(void);
  88. };
  89.  
  90.